#include "processbar.h"
#include <unistd.h>

const char* syb = "|/-\\";

void process()
{
  int perc = 0;
  char date[101] = { 0 };
  while(perc < 100)
  {
    date[perc] = '#';
    printf("\r");
    printf("[%-50s][%3d%%][%c]", date, perc + 1, syb[perc % 5]);
    fflush(stdout);
    //sleep(1);
    usleep(1000 * 40);
    perc++;
  }
  printf("\n");
}
